package com.meixiang.activity.account.managers.myPurse;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import com.meixiang.R;
import com.meixiang.dialog.TradersPasswordtKeyDialog;
import com.meixiang.main.BaseActivity;
import com.meixiang.view.CheckEditTextEmptyButton;
import com.meixiang.view.ClearEditText;
import com.meixiang.view.TitleView;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 *  我的钱包 提现
 *
 * @author zys
 */
public class WithdrawActivity extends BaseActivity {


    @Bind(R.id.title)
    TitleView title;
    @Bind(R.id.et_withdraw_number)
    ClearEditText etWithdrawNumber;
    @Bind(R.id.tv_withdraw)
    CheckEditTextEmptyButton tvWithdraw;
    @Bind(R.id.ll_banks)
    LinearLayout llBanks;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_withdraw);
        ButterKnife.bind(this);
        super.onCreate(savedInstanceState);

    }

    @Override
    protected void initTitle() {
        title.setTitle("余额提现");
        title.showRightButton(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub

            }
        });
        title.setLeftImageButton(R.mipmap.back);
        title.showLeftButton(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void setData() {

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ButterKnife.unbind(this);
    }

    @OnClick(R.id.tv_withdraw)
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_withdraw:
                if(v.equals(tvWithdraw)){
//                    new TradersPasswordtKeyDialog(this,"提现",etWithdrawNumber.getText().toString(), new TradersPasswordtKeyDialog.OnCustomDialogListener() {
//                        @Override
//                        public void getPayPassWord(TradersPasswordtKeyDialog paymentKeyDialog, String password) {
//
//                        }
                            new TradersPasswordtKeyDialog(this, "提现", etWithdrawNumber.getText().toString(), new TradersPasswordtKeyDialog.OnCustomDialogListener() {
                                @Override
                                public void getPayPassWord(TradersPasswordtKeyDialog paymentKeyDialog, String password) {
                                   // pay("YE", password);
                                }

                    });


                   // startActivity(new Intent(WithdrawActivity.this,WithdrawSucceedActivity.class));
                }
                break;
        }
    }
}
